From 3d2d12d12f38a0091b71192c130f73559a5a447e Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Wed, 19 Mar 2008 06:33:39 +0000 Subject: [PATCH] * Add a nice fieldset around the input form * Fix double escaping --- includes/SpecialMIMEsearch.php | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/includes/SpecialMIMEsearch.php b/includes/SpecialMIMEsearch.php index c89c1af62e..041d89879a 100644 --- a/includes/SpecialMIMEsearch.php +++ b/includes/SpecialMIMEsearch.php @@ -12,7 +12,6 @@ /** * Searches the database for files of the requested MIME type, comparing this with the * 'img_major_mime' and 'img_minor_mime' fields in the image table. - * @addtogroup SpecialPage */ class MIMEsearchPage extends QueryPage { var $major, $minor; @@ -87,15 +86,12 @@ function wfSpecialMIMEsearch( $par = null ) { $mime = isset( $par ) ? $par : $wgRequest->getText( 'mime' ); $wgOut->addHTML( - Xml::openElement( 'form', - array( - 'id' => 'specialmimesearch', - 'method' => 'get', - 'action' => $wgTitle->escapeLocalUrl() - ) - ) . - Xml::inputLabel( wfMsg( 'mimetype' ), 'mime', 'mime', 20, $mime ) . - Xml::submitButton( wfMsg( 'ilsubmit' ) ) . + Xml::openElement( 'form', array( 'id' => 'specialmimesearch', 'method' => 'get', 'action' => $wgTitle->getLocalUrl() ) ) . + Xml::openElement( 'fieldset' ) . + Xml::element( 'legend', null, wfMsg( 'mimesearch' ) ) . + Xml::inputLabel( wfMsg( 'mimetype' ), 'mime', 'mime', 20, $mime ) . ' ' . + Xml::submitButton( wfMsg( 'ilsubmit' ) ) . + Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' ) ); @@ -113,7 +109,7 @@ function wfSpecialMIMEsearchParse( $str ) { if( strpos( $str, '/' ) === false) { return array ('', ''); } - + list( $major, $minor ) = explode( '/', $str, 2 ); return array( @@ -138,4 +134,3 @@ function wfSpecialMIMEsearchValidType( $type ) { return in_array( $type, $types ); } - -- 2.20.1